home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
fish
/
001-100
/
001-025
/
010
/
iff
/
packer.h
< prev
next >
Wrap
C/C++ Source or Header
|
1995-03-17
|
2KB
|
40 lines
#ifndef PACKER_H
#define PACKER_H
/*----------------------------------------------------------------------*
* PACKER.H typedefs for Data-Compresser. 11/15/85
*
* This module implements the run compression algorithm "cmpByteRun1"; the
* same encoding generated by Mac's PackBits.
*
* By Jerry Morrison and Steve Shaw, Electronic Arts.
* This software is in the public domain.
*
* This version for the Commodore-Amiga computer.
*----------------------------------------------------------------------*/
#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif
/* This macro computes the worst case packed size of a "row" of bytes. */
#define MaxPackedSize(rowSize) ( (rowSize) + ( ((rowSize)+127) >> 7 ) )
/* Given POINTERS to POINTER variables, packs one row, updating the source
* and destination pointers. Returns the size in bytes of the packed row.
* ASSUMES destination buffer is large enough for the packed row.
* See MaxPackedSize. */
extern LONG PackRow(/* BYTE **, BYTE **, LONG */);
/* pSource, pDest, rowSize */
/* Given POINTERS to POINTER variables, unpacks one row, updating the source
* and destination pointers until it produces dstBytes bytes (i.e., the
* rowSize that went into PackRow).
* If it would exceed the source's limit srcBytes or if a run would overrun
* the destination buffer size dstBytes, it stops and returns TRUE.
* Otherwise, it returns FALSE (no error). */
extern BOOL UnPackRow(/* BYTE **, BYTE **, WORD, WORD */);
/* pSource, pDest, srcBytes, dstBytes */
#endif